<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>catch</title>
</head>
<body>
	About to do a risky thing:<br>
	
	<c:catch var="myException">
		Inside the catch......
		<% int x = 10 / 0; %>
	</c:catch>
	
	<c:if test="${myException != null}">
		There was an exception: ${myException.message}<br>
	</c:if>
	
	We survived.
</body>
</html>